package file;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

public class WriteToFileMain {
	
	public static void main(String[] args) throws IOException {
		
		File f = new File("C:\\java-master\\a.bit");
		
		if (!f.exists()) {
			f.createNewFile();
		}
		
		FileOutputStream out = new FileOutputStream(f, true);
		
		out.write(72);	// H
		out.write(101);	// e
//		out.write(13);	// [CR]
		out.write(108);	// l
//		out.write(13);	// [CR]
//		out.write(10);	// [LF]
		out.write(108);	// l
//		out.write(10);	// [LF]
//		out.write(13);	// [CR]
		out.write(111);	// o
		
		out.close();
		
		System.out.println("파일 기록 완료~");
	}
	
}
